import javax.swing.text.html.HTML.Tag;

public class citeseerxEngine extends IProvider {
	public citeseerxEngine(BotConfig cfg){
		super(cfg);
		_posCntSD = new SearchDetails(".* ([,0-9]+) documents found.*",
				1, null, Tag.TD);
	}
	
	private SearchDetails _posCntSD = null;
	@Override
	protected SearchDetails getPositionCountSearch(){
		return _posCntSD;
	}
	
	@Override
	protected String getEnginName() {
		return "citeseerx";
	}
	@Override
	protected String getSearchURL(int Year, String useCase, String categ) {
		String q = useCase.replace('|', '+');
		if(q.length() > 0)
			q += "+";
		q += categ;
		
		String patUrl ="http://citeseerx.ist.psu.edu/search?q=" +
		q + "+year%3A" + Integer.toString(Year);
		return patUrl;
	}
	@Override
	protected String getURL(String extUrl){
		return extUrl;
	}

	@Override
	protected SearchDetails getKeySearchDetails(int idx) {
		return null;
	}
	@Override
	protected int getKeyWordCount() {
		return 0;
	}
	@Override
	protected String getKeyWordName(int idx) {
		return null;
	}
}
